using SOM.AbstractDAL;
using SOM.Model;
using SOM.SingletonContext;

namespace SOM.ConcreteDAL
{
    public class VideoDAL : AbstractVideoDAL
    {
        private SOMEntities _contexto;

        public VideoDAL()
        {
            _contexto = new SOMEntities();
        }
        
        public override void Delete(Video video)
        {
            _contexto.DeleteObject(video);

            _contexto.SaveChanges();
        }

        public override void Delete(Video video, SOMEntities contexto)
        {
            contexto.DeleteObject(video);
            contexto.SaveChanges();
        }
    }
}